package flashSecurityServer.handler;

import org.apache.log4j.Logger;
import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;

import flashSecurityServer.log.EbocyLogManager;

public class BasicHandler extends IoHandlerAdapter {
	protected static Logger logger = EbocyLogManager.getSystemLogger();
	@Override
	public void exceptionCaught(IoSession ioSession, Throwable cause) {
		cause.printStackTrace();
		logger.error("************", cause);
	}
	@Override
	public void sessionOpened(IoSession ioSession) throws Exception {
		logger.info("session open for " + ioSession.getRemoteAddress());
	}
	@Override
	public void sessionClosed(IoSession ioSession) throws Exception {
		logger.info("session closed from " + ioSession.getRemoteAddress());
	}
}
